package cn.wolfcode.wms.mapper;


import cn.wolfcode.wms.domain.Role;
import cn.wolfcode.wms.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    void deleteByPrimaryKey(Long id);
    void insert(Role role);
    Role selectByPrimaryKey(Long id);
    List<Role> selectAll();
    void updateByPrimaryKey(Role role);
    Integer selectForCount(QueryObject qo);
    List<Role> selectForList(QueryObject qo);
    void insertRelation(@Param("roleId") Long roleId,
                        @Param("permissionId") Long permissionId);
    void deleteRelation(Long roleId);
    void insertMenuRelation(@Param("roleId") Long roleId,
                            @Param("menuId") Long menuId);
    void deleteMenuRelation(Long roleId);
}